package com.example.demo.controller;

import com.example.demo.entity.User;
import com.example.demo.mapper.mysqlMapper.UserMySqlMapper;
import com.example.demo.mapper.oracleMapper.UserOracleMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class UserController {
    @Autowired
    private UserMySqlMapper userMapperMySql;
    @Autowired
    private UserOracleMapper userMapperOracle;


    @RequestMapping("/test")
    public void test(){
        List<User> users = userMapperMySql.selectAll();
        System.out.println(users);
        userMapperOracle.addUser(users.get(0));

    }
}
